#ifndef BYHH_H
#define BYHH_H

#include "bbs.h"
#include "namespace.h"
#include <QtGui>
#include <QtCore>
#include <QtNetwork>

class byhhUser : public User{
};

class byhhArticle : public Article{
    public:
	QString reply();
	/*
	 * Return a html format string.
	 */
	QString display();
	QString string2Html(QString str) const;
};

class byhhTopic : public Topic{
    Q_OBJECT
    public slots:
	void refreshMe();
    protected slots:
	void extractArticle(int num , bool error);
};

class byhhBoard : public Board {
    Q_OBJECT
    public slots:
	void refreshMe();
	void send(QString title, QString signature, QString text);
    protected slots:
	void extractTopic(int num , bool error);
};

class byhh : public BBS {
    Q_OBJECT
    public:
	byhh(Profile * profile, QString newName = "new BYHH BBS");
    public slots:
	void start(void) ;
	void stop(void) ;
	void restart(void) ;
	void setIdPasswd(void);
	void refreshMe();
    private slots:
	void extractAllBoard(int num, bool error);
	void extractGuestBoard(int num, bool error);
	void verifyCookie(int num, bool error);
	void checkLogin(int num, bool error);
	void clear(void);
    private:
	QTimer Timer;
	void login(void);
	void logout(void);
	QHttp * connection;
	
};
#endif

